#include <stdio.h>
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	int shang=a/b;
	int yu=a%b;
	printf("%d %d",shang,yu);
}